﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using VietImage.Models;
using VietImage.ViewModels;
using VietImage.Roles;
namespace VietImage.Controllers
{
    public class HomeController : Controller
    {
        //
        // GET: /Home/

        public ActionResult Index()
        {
            int n;
            ViewData["DailyImages"] = Image.GetListAvailable(8, 0, out n);
            ViewData["WeeklySubCategories"] = Category.GetListAvailableSubCategories().OrderByDescending(p => p.CreatedTime).Take(8).ToList();
            ViewData["ParentCategories"] = Category.GetListAvailableParentCategories();
            return View();
        }

    }
}
